﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Xml.Linq;


namespace LightWeightORM
{
    namespace ORM
    {
        namespace MappingAttribute
        {
            /// <summary>
            /// Summary description for TableMappingAttribute
            /// </summary>
            public class TableMappingAttribute : Attribute
            {
                private string _tableName;
                private string _primaryKey;

                public string PrimaryKey
                {
                    get { return _primaryKey; }
                    set { _primaryKey = value; }
                }

                public string TableName
                {
                    get { return _tableName; }
                    set { _tableName = value; }
                }

                public TableMappingAttribute(string tableName)
                {
                    this.TableName = tableName;
                }
                public TableMappingAttribute(string tableName, string primaryKey)
                    : this(tableName)
                {
                    this.PrimaryKey = primaryKey;
                }
            }
        }
    }
}